﻿<UserControl
    x:Class="Looptribe.Moodlin8.View.NavPopup"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Looptribe.Moodlin8.View"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:uiHelper="using:Looptribe.Moodlin8.UIHelper"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400">

    <StackPanel Orientation="Horizontal">
        <StackPanel Orientation="Horizontal" PointerPressed="ShowPopup">
            <TextBlock Name="title" HorizontalAlignment="Left" Margin="5,60,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Style="{StaticResource HeaderTextStyle}" Foreground="#FF999999"/>
            <Image Source="ms-appx:///Assets/Nav_arrow.png" Margin="0,60,0,0" Stretch="None" VerticalAlignment="Center"/>
        </StackPanel>
        <Popup IsLightDismissEnabled="True" VerticalOffset="120" Width="250" HorizontalOffset="-250" Name="popup">
            <Popup.ChildTransitions>
                <TransitionCollection>
                    <RepositionThemeTransition />
                </TransitionCollection>
            </Popup.ChildTransitions>
            <Border BorderBrush="Black" BorderThickness="2">
                <Border.Background>
                    <LinearGradientBrush EndPoint="0,0" StartPoint="1,1" >
                        <GradientStop Color="#fdfdfd"/>
                        <GradientStop Color="#d3d3d3" Offset="1"/>
                    </LinearGradientBrush>
                </Border.Background>
                <ListView ItemsSource="{Binding NavItems}" Width="300" SelectionMode="None" IsSwipeEnabled="False"
                          Name="items"
                                      IsItemClickEnabled="True" uiHelper:ItemClickCommand.Command="{Binding NavigateCommand}"
                                      ScrollViewer.VerticalScrollBarVisibility="Disabled"
                                      BorderThickness="0" VerticalContentAlignment="Bottom" ItemContainerStyle="{StaticResource NavPopupStyle}" />
            </Border>
        </Popup>
    </StackPanel>
</UserControl>
